{% extends 'blog/base_index.html' %}
{% block body_content %}
    <div class="col-sm-9">
        <div class="blog-cat-title clearfix">
            返回结果
        </div>
        {% if error_msg %}
            <h1 >{{ error_msg }}</h1>
        {% endif %}
        {% if displayed_blog %}
            <div class="blog-list-block">
                <div class="news-list-item-b clearfix">
                    <div class="article-list" id="article-list">
                        {% for blog in displayed_blog.object_list %}
                            <div class="item">
                                <a href="{% url 'blogDetail' blog.category.parent.url_slug blog.category.url_slug   %}?blog={{ blog.url_slug }}" class="title">{{ blog.title }}</a>
                                <div class="status">
                                    发布于:{{ blog.created_time }}|阅读:{{ blog.views }}|分类:<a href="{% url 'blogDetail' blog.category.parent.url_slug blog.category.url_slug   %}"
                                        class="label label-default">{{ blog.category.name }}</a>
                                </div>
                                <div class=" content"> {{ blog.desc }}
                                </div>
                            </div>
                        {% endfor %}
                        <ul id="most_view" class="pager">
                            {% if displayed_blog.has_previous %}
                                <li id="blog{{ displayed_blog.previous_page_number.querystring | slice:'-1:' }}"
                                    class="prev"><a
                                        href="?{{ displayed_blog.previous_page_number.querystring }}">上一页</a></li>
                            {% else %}
                                <li><span class="disabled prev">上一页</span></li>
                            {% endif %}
                            {% for page in displayed_blog.pages %}
                                {% if page %}
                                    {% ifequal page displayed_blog.number %}
                                        <li class="active"><span>{{ page }}</span></li>
                                    {% else %}
                                        <li id="blog{{ page.querystring|slice:'-1:' }}"><a
                                                href="?{{ page.querystring }}" class="page">{{ page }}</a></li>
                                    {% endifequal %}
                                {% else %}
                                    ...
                                {% endif %}
                            {% endfor %}
                            {% if displayed_blog.has_next %}
                                <li id="blog{{ displayed_blog.next_page_number.querystring|slice:'-1:' }}"><a
                                        href="?{{ displayed_blog.next_page_number.querystring }}" class="next">下一页</a>
                                </li>
                            {% else %}
                                <li><span class="disabled next">下一页</span></li>
                            {% endif %}
                        </ul>
                    </div>
                </div>
            </div>
        {% endif %}
    </div>







{% endblock %}

